home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 16 / AMIGAplus Sonderheft 16 (1998)(ICP)(DE)[!].iso / pd / anwendungen / rtgmaster_dev / includes / sasc / rtgmaster / rtgmaster.h < prev    next >
C/C++ Source or Header  |  1998-01-18  |  7KB  |  272 lines

  1. /*
  2. **     $VER: rtgmaster.h 1.012 (08 Mar 1997)
  3. */
  4.  
  5. #ifndef RTGMASTER_H
  6. #define RTGMASTER_H TRUE
  7.  
  8. #ifndef UTILITY_TAGITEM_H
  9. #include "utility/tagitem.h"
  10. #endif
  11.  
  12. #ifndef EXEC_LIBRARIES_H
  13. #include "exec/libraries.h"
  14. #endif
  15.  
  16. #ifndef EXEC_TYPES_H
  17. #include "exec/types.h"
  18. #endif
  19.  
  20. #define smr_Dummy      TAG_USER
  21. #define smr_MinWidth   (smr_Dummy + 0x01)
  22.  
  23. // [320] This tag sets the minimum width in
  24. // pixels which the user is allowed to select
  25.  
  26. #define smr_MaxWidth   (smr_Dummy + 0x02)
  27.  
  28. // [2048] This tag sets the maximum width in
  29. // pixels which the user is allowed to select
  30.  
  31. #define smr_MinHeight  (smr_Dummy + 0x03)
  32.  
  33. // [200] This tag sets the minimum height in
  34. // pixels which the user is allowed to select
  35.  
  36. #define smr_MaxHeight  (smr_Dummy + 0x04)
  37.  
  38. // [2048] This tag sets the maximum height in
  39. // pixels which the user is allowed to select
  40.  
  41. #define smr_PlanarRoundW (smr_Dummy + 0x05)
  42.  
  43. // [16] RtgScreenModeReq will round user inputed
  44. // values for Width to nearest higher multiple
  45. // of thig tag for Planar display modes
  46.  
  47. #define smr_PlanarRoundH (smr_Dummy + 0x06)
  48.  
  49. // [1] RtgScreenModeReq will round user inputed
  50. // values for Height to nearest higher multiple
  51. // of thig tag for Planar display modes
  52.  
  53. #define smr_ChunkyRoundW (smr_Dummy + 0x07)
  54.  
  55. // [1] RtgScreenModeReq will round user inputed
  56. // values for Width to nearest higher multiple
  57. // of thig tag for Chunky display modes
  58.  
  59. #define smr_ChunkyRoundH (smr_Dummy + 0x08)
  60.  
  61. // [1] RtgScreenModeReq will round user inputed
  62. // values for Height to nearest higher multiple
  63. #define smr_ProgramUsesC2P   (smr_Dummy + 0x0c)
  64.  
  65. // [TRUE] If the program doesn't use the c2p call you have
  66. // to specify FALSE. In this case the c2p part of the
  67. // window is hidden and the the current c2p module is not
  68. // used when filtering the screen modes.
  69.  
  70. // of thig tag for Chunky display modes
  71.  
  72. #define smr_ChunkySupport (smr_Dummy + 0x09)
  73.  
  74. // [0] This LONG is used to indicate which
  75. // Chunky modes the user is allowed to select.
  76. // A set bit means the mode is selectable.
  77. // See the rtg_ChunkySupport tag for more
  78. // information.
  79.  
  80. #define smr_PlanarSupport (smr_Dummy + 0x0a)
  81.  
  82. // EITEM smr_PlanarSupport ;[0] This LONG is used to indicate which
  83. // Planar modes the user is allowed to select.
  84. // A set bit means the mode is selectable.
  85. // See the rtg_PlanarSupport tag for more
  86. // information.
  87.  
  88. #define smr_Buffers       (smr_Dummy + 0x0b)
  89.  
  90. // [1] Using this tag you're can specify
  91. // the number of buffers your application needs.
  92. // Usually this ranges from 1-3.  Specify
  93. // it here to filter out ScreenModes which can't
  94. // handle the number of buffers you require.
  95.  
  96. //*******
  97. // Attention: The following initial values are overwritten
  98. // by the saved preferences if a valid preferences file
  99. // is found.
  100.  
  101. #define smr_InitialWidth    (smr_Dummy + 0x10)
  102.  
  103. // [320] Initial screen width
  104. // The minimal/maximal selectable width is taken into account.
  105.  
  106. #define smr_InitialHeight   (smr_Dummy + 0x11)
  107.  
  108. // [200] Initial screen height
  109. // The minimal/maximal selectable height is taken into account.
  110.  
  111. #define smr_InitialDepth    (smr_Dummy + 0x12)
  112.  
  113. // [8] Log2 number of colors
  114.  
  115. #define smr_InitialScreenMode (smr_Dummy + 0x13)
  116.  
  117. // [the first selectable screenmode]
  118. // Ptr to a string describing the ScreenMode
  119. // (this is essentially the string pointed to
  120. // by sm_Name)
  121.  
  122. #define smr_InitialDefaultW   (smr_Dummy + 0x14)
  123.  
  124. // [TRUE] False if you don't want the Default
  125. // width gadget active.
  126.  
  127. #define smr_InitialDefaultH   (smr_Dummy + 0x15)
  128.  
  129. // [TRUE] False if you don't want the Default
  130. // height gadget active.
  131.  
  132. #define smr_PrefsFileName     (smr_Dummy + 0x16)
  133.  
  134. // ["RtgScreenMode.prefs"]
  135. // Specifies the file where the selected screenmode loaded from
  136. // and saved to. If you set this to NULL, the save gadget
  137. // is disabled and no screenmode is loaded at the beginning.
  138. // The window is certainly opened without pressing the shift
  139. // key then.
  140. // If a valid preferences file is found the "smr_Initial" tags
  141. // are ignored. It makes not much sense to specify inital values
  142. // without setting smr_PrefsFileName to NULL.
  143.  
  144. #define smr_ForceOpen         (smr_Dummy + 0x17)
  145.  
  146. // [FALSE] If false, the screenmode requester reads the screenmode
  147. // from the file specified by smr_PrefsFileName and returns immediately.
  148. // The requester opens only in case of an error when reading the preferences
  149. // or when the user presses shift while the requester is called.
  150. // If true, the requester opens in any case and lets the user select a
  151. // new mode.
  152.  
  153. #define smr_TitleText         (smr_Dummy + 0x18)
  154.  
  155. // ["RTG Screenmode Requester"] (STRPTR)
  156. // The title text of the window
  157.  
  158. #define smr_WindowLeftEdge   (smr_Dummy + 0x19)
  159.  
  160. // [-1 (= centered)] The left edge of the requester window
  161. // The value -1 means that the window is centered horicontically.
  162.  
  163. #define smr_WindowTopEdge    (smr_Dummy + 0x1a)
  164.  
  165. // [-1 (= centered)] The top edge of the requester window
  166. // The value -1 means that the window is centered vertically.
  167.  
  168. #define smr_Screen           (smr_Dummy + 0x1b)
  169.  
  170. // [Default Pubscreen] (struct Screen *)
  171. // The (custom or public) screen on which the screenmode requester should
  172. // be opened
  173.  
  174. #define smr_PubScreenName    (smr_Dummy + 0x1c)
  175.  
  176. // [NULL] (STRPTR)
  177. // The name of the public screen on which the screenmode
  178. // requester should be opened; if not found, the default
  179. // pubscreen is used.
  180.  
  181. //----------------added on 27/10/97 by Wolfram---------------
  182.  
  183. #define smr_MinPixelAspect   (smr_Dummy + 0x1d)
  184.  
  185. // [0] Minimal pixel aspect, defined as
  186. // (1 << 16) * pixel_height / pixel_width
  187. // see also: smr_PixelAspect_Proportional, _Wide and _High
  188.  
  189. #define smr_MaxPixelAspect   (smr_Dummy + 0x1e)
  190.  
  191. // [ULONG_MAX] Maximal pixel aspect, defined as
  192. // (1 << 16) * pixel_height / pixel_width
  193.  
  194. #define smr_Workbench (smr_Dummy + 0x1f)
  195.  
  196. // Offer Workbench Support
  197.  
  198. // End of RtgScreenModeReq() enumeration ***
  199.  
  200.  
  201. //**********************************************************************
  202. // Special values for smr_MinPixelAspect and smr_MaxPixelAspect:
  203. //
  204. // If you want to get only proportional screen modes with 20% variation,
  205. // you can set for example:
  206. //
  207. // smr_MinPixelAspect, smr_PixelAspect_Proportional *  8 / 10,
  208. // smr_MaxPixelAspect, smr_PixelAspect_Proportional * 12 / 10
  209. //
  210.  
  211. #define smr_PixelAspect_Proportional (1 << 16)
  212. #define smr_PixelAspect_Wide         (smr_PixelAspect_Proportional / 2)
  213. #define smr_PixelAspect_Narrow       (smr_PixelAspect_Proportional * 2)
  214.  
  215.  
  216. // Execpt for the rb_LibBase structure this structure is private and for
  217. // the internal use of RtgMaster.library ONLY.  This structure will change
  218. // in the future.
  219.  
  220.  
  221. struct RDCMPData
  222. {
  223.     struct MsgPort *port;
  224.     ULONG signal;
  225.     WORD *MouseX;
  226.     WORD *MouseY;
  227. };
  228.  
  229. struct RTGMasterBase {
  230.     struct Library base;
  231.     WORD   Pad;
  232.     ULONG  SegList;
  233.     APTR   DosBase;
  234.     APTR   ExecBase;
  235.     APTR   GadToolsBase;
  236.     APTR   GfxBase;
  237.     APTR   IntBase;
  238.     APTR   UtilityBase;
  239.     BYTE   Track[8];
  240.     struct RtgLibs *Libraries;
  241.     APTR   FirstScreenMode;
  242.     APTR   LinkerDB;
  243. };
  244.  
  245. // This structure is private and for the internal use of RtgMaster.library
  246. // ONLY.  This structure will change in the future.
  247.  
  248. struct RtgLibs {
  249.     APTR  Next;
  250.     ULONG ID;
  251.     APTR  LibBase;
  252.     APTR  SMList;
  253.     APTR  LastSM;
  254.     UWORD LibVersion;
  255. };
  256.  
  257. struct RtgBobHandle
  258. {
  259.  ULONG BufSize;
  260.  struct RtgScreen *RtgScreen;
  261.  APTR RefreshBuffer;
  262.  ULONG BPR;
  263.  ULONG Width;
  264.  ULONG Height;
  265.  UWORD numsprites;
  266.  UWORD maxnum;
  267.  ULONG reserved;
  268. };
  269.  
  270. #endif
  271.  
  272.